package com.managerstudy.managerback.exception;


import com.managerstudy.managerback.utils.BaseResult;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice("com.managerstudy.managerback.controller")
public class GlobalException {

    @ExceptionHandler(Exception.class)
    @ResponseBody
    public BaseResult error(Exception e) {
        return BaseResult.error();
    }
}
